Inside ZStack .offset lets you control how Views should overlap.
In this example we use .offset to move Author's name from the bottomTrailing corner.
ContentView.swift
struct ContentView: View {
var body: some View {
ZStack(alignment: .bottomTrailing) {
Image("Person").resizable().aspectRatio(contentMode: .fit)
Text("Photo: By John")
.border(Color.red, width: 2)
.padding(4)
.background(Color.blue)
.foregroundColor(.white)
.offset(x: -30, y: -10) //From bottomTrailing corner
}
}
}
Output